package de.tum.in.eist.poll.client;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import de.tum.in.eist.poll.client.Feedback;
import de.tum.in.eist.poll.client.Lecture;
import de.tum.in.eist.poll.client.User;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("pollService")
public interface PollService extends RemoteService {
	/**
	 * Requests a login by sending name and password. Commented out as not important
	 * for alpha version.
	 * 
	 * @param name the name sent by the client
	 * @param password the password sent by the client
	 * @return the user corresponding to name and password
	 * @throws IllegalArgumentException if name and password don't match
	 */
	//User login(String name, String password) throws IllegalArgumentException;
	
	/**
	 * Requests a list of all lectures relevant to this user. Commented out as not important
	 * for alpha version.
	 * 
	 * @param user the user that requested this list
	 * @return a list of all lectures relevant to the user
	 */
	//List<Lecture> requestLectures(User user);
	
	/**
	 * Requests all feedback for a lecture.Commented out as not important
	 * for alpha version.
	 * 
	 * @param lecture the lecture to get feedback for
	 * @return all of the feedback corresponding to a lecture
	 */
	//List<Feedback> requestFeedback(Lecture lecture);
	
	/**
	 * Submit feedback to the server.
	 * 
	 * @param feedback the feedback to submit.
	 * @return the server's answer
	 */
	boolean submitFeedback(Feedback feedback);
	
}
